home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Archive / Graphics / QuickDraw GX / GX->PostScript Sample / GXToPostScript / PostScriptCompile.se < prev    next >
Encoding:
Text File  |  2000-09-28  |  976 b   |  26 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        PostScriptCompile.se
  3. #
  4. #    Contains:    This StreamEdit Script in conjunction with an MPW script will act as the 
  5. #                "PostScript compiler"
  6. #                It removes all blank lines, all comments, and all extra space/tabs.
  7. #                It also encloses each line in quotes.
  8. #                The MPW script portion adds the resource header, etc…
  9. #
  10. #    Copyright:    © 1995-1997 by Apple Computer, Inc., all rights reserved.
  11. #
  12. #
  13.  
  14. Option AutoDelete
  15.  
  16. /([∂t ])«2,»/ Replace // " "                    #get rid of multiple spaces and tabs
  17. /•∂n/ Next                                        #move to next line if left blank.
  18. /[∂t ]*([¬%]*)®1≈/ Change ®1                    #gets rid of tab/space at beginning and comment at the end
  19.  
  20. /•∂n/ Next                                        #move to next line if left blank. 
  21. /([∂t ])«2,»/ Replace // " "                    #get rid of multiple spaces and tabs 
  22. /•∂n/ Next                                        #move to next line if left blank. 
  23. /[∂t ]*([¬%]*)®1≈/ Change ®1                    #gets rid of tab/space at beginning and comment at the end 
  24.  
  25. Print '∂t∂"'.'∂\n∂"'                            #enclose what's left in quotes and \n
  26.